// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** getClassById GET /api/class/${param0} */
export async function getClassByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getClassByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.ResultClassVO_>(`/api/class/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** addClass POST /api/class/add */
export async function addClassUsingPost(body: API.ClassDTO, options?: { [key: string]: any }) {
  return request<API.ResultVoid_>('/api/class/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** addStudentsByClass POST /api/class/add/students */
export async function addStudentsByClassUsingPost(
  body: API.ClassAddStudentsRequest,
  options?: { [key: string]: any },
) {
  return request<API.ResultInt_>('/api/class/add/students', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteClassById DELETE /api/class/delete/${param0} */
export async function deleteClassByIdUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteClassByIdUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.ResultVoid_>(`/api/class/delete/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** getClassByTeacherId GET /api/class/get/byTeacher */
export async function getClassByTeacherIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getClassByTeacherIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.ResultListClassVO_>('/api/class/get/byTeacher', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getAllMajor GET /api/class/get/major */
export async function getAllMajorUsingGet(options?: { [key: string]: any }) {
  return request<API.ResultListString_>('/api/class/get/major', {
    method: 'GET',
    ...(options || {}),
  });
}

/** getStuCountByClass GET /api/class/get/stuCount/${param0} */
export async function getStuCountByClassUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getStuCountByClassUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.ResultInt_>(`/api/class/get/stuCount/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** listAllClasses GET /api/class/list */
export async function listAllClassesUsingGet(options?: { [key: string]: any }) {
  return request<API.ResultListClassVO_>('/api/class/list', {
    method: 'GET',
    ...(options || {}),
  });
}

/** getStudentListDontSelectClass GET /api/class/list/student/noneClass */
export async function getStudentListDontSelectClassUsingGet(options?: { [key: string]: any }) {
  return request<API.ResultListUserVO_>('/api/class/list/student/noneClass', {
    method: 'GET',
    ...(options || {}),
  });
}

/** pageClasses POST /api/class/page */
export async function pageClassesUsingPost(body: API.ClassDTO, options?: { [key: string]: any }) {
  return request<API.ResultPageClassVO_>('/api/class/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** updateClass PUT /api/class/update */
export async function updateClassUsingPut(body: API.ClassDTO, options?: { [key: string]: any }) {
  return request<API.ResultVoid_>('/api/class/update', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
